<template>
	<view>

		<button @click="qq()">请求测试</button>

	</view>
</template>

<script>
	import {
		myRequest
	} from '@/utils/request.js'



	export default {
		data() {
			return {

			}
		},
		onLoad() {

		},
		methods: {
			qq() {

				myRequest({
						url: '/ping',
						method: 'POST',
						data: {
							zd1: "qwe",
							zd2: 123
						}
					})
					.then(data => {
						console.log('Data:', data); // 成功时打印数据
					})

			}

		}
	}
</script>

<style>

</style>




//参考
//https://blog.csdn.net/weixin_50606255/article/details/118439664
//https://www.51cto.com/article/813601.html